﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace Gencode.PrsWeb
{
    public partial class Planer : Gencode.Web.Common.MasterWebPage//System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
			if (Gencode.Common.Util.ErrorHandler == null)
				Gencode.Common.Util.RegisterErrorhandler(new Gencode.Web.Errorhandling.Handler());

            //TODO:
            //In config datei auslagern
            AddHeader(LoadControl("Modules\\Header.ascx"));
            AddFooter(LoadControl("Modules\\Footer.ascx"));
            AddMenu(LoadControl("Modules\\MainMenu.ascx"));
        }

        public void AddHeader(Control control)
        {
            header.Controls.Add(control);
        }

        public void AddFooter(Control control)
        {
            footer.Controls.Add(control);
        }

        public void AddMenu(Control control)
        {
            menu.Controls.Add(control);
        }
    }
}
